<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<link rel="stylesheet" href="pages/system/css/usermng.css" />

<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<ul class="breadcrumb">
				<li><span class="c-999">系统管理</span><i class="icon-angle-right"></i></li>
				<li><a class="c-666" onclick="util.showContent('pages/system/usermng.jsp')">用户管理</a></li>
			</ul>
		</div>
	</div>
	<div class="search-box">
		<div class="search-title">
			<span class="search-criteria c-666">&nbsp;查询条件</span>
		</div>
		<form id="user_search_form">
			<table class="search-body" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td>
						<label class="my-label">关键字：
							<input id="id_keyword" class="my-input-270" type="text" placeholder="请输入账户、姓名、邮箱或手机号查询" />
							<input style="display:none;" />
						</label>
						<label class="my-label">账户类型：
							<select id="id_user_class" class="my-select-177" >
							</select>
						</label>
						<label class="my-label"><input id="id_unbinded" type="checkbox" />未绑定</label>
					</td>
				</tr>
			</table>
		</form>
		<ul class="search-button">
			<li><button class="btn blue" id="btn_query">查&nbsp;&nbsp;询</button></li>
			<li><button class="btn blue" id="btn_reset">重&nbsp;&nbsp;置</button></li>
		</ul>
	</div>
	<div class="table-con">
		<div class="table-head">
			&nbsp;&nbsp;&nbsp;<i class="icon-reorder"></i>&nbsp;列表详情
		</div>
		<div class="list-body">
			<div class="portlet-body">
				<p>
					<button id="user_binding" type="button" class="btn blue hide" data-toggle="modal">绑定账号</button>
					<button id="user_binding_edit" type="button" class="btn green hide" data-toggle="modal">编辑绑定</button>
					<button id="user_binding_cancel" type="button" class="btn bg-orange hide">解除绑定</button>
					<button id="user_lock" type="button" class="btn red hide">锁定账户</button>
					<button id="user_lock_cancel" type="button" class="btn bg-orange hide">解锁账户</button>
					<button id="user_validity" type="button" class="btn green hide" data-toggle="modal">账户期限设置</button>
				</p>
			</div>
			<h4>尚有&nbsp;<span class="c-red c-bold" id="unBindedCount">0</span>&nbsp;个客户未绑定账户</h4>
			<div class="table-responsive">
				<table class="table table-bordered table-striped table-hover"
					id="user_grid_panel">
					<thead>
						<tr>
							<th class="sorting_asc_disabled" style="width:8px;"><input
								type="checkbox" class="group-checkable"
								data-set="#user_grid_panel .checkboxes" />
							</th>
							<th class="fourMinWidth">登录账户</th>
							<th class="twoMinWidth">姓名</th>
							<th class="twoMinWidth">邮箱</th>
							<th class="twoMinWidth">手机</th>
							<th class="fourMinWidth">账户类型</th>
							<th class="twoMinWidth">归属</th>
							<th class="twoMinWidth">角色</th>
							<th class="fourMinWidth">账户开通时间</th>
							<th class="fourMinWidth">账户截止时间</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/pages/common/modal.jsp"></jsp:include>
<div id="bind_account" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
	<div class="modal-header add-customer-header bg-green c-bold c-fff" id="bind_account_title">
		绑定账号
	</div>
	<div class="modal-body add-customer-body">
		<form id="user_form">
			<input type="hidden" id="form_pkId"/>
			<input type="hidden" id="form_eId"/>
			<input type="hidden" id="form_userClass"/>
			<input type="hidden" id="form_oldPass"/>
			<input type="hidden" id="form_roleId"/>
			<table class="table" id="user_info_table">
				<tr>
					<td><span>所属客户：</span><span id="form_ownerComp" class="my-text"></span></td>
					<td><span>所属厂区：</span><span id="form_ownerFactory" class="my-text"></span></td>
				</tr>
				<tr>
					<td colspan="2"><span>所属地市：</span><span id="prov_city" class="my-text" ></span></td>
				</tr>
				<tr>
					<td><span>姓名：</span><span id="form_empName" class="my-text"></span></td>
					<td><span>性别：</span><span id="form_sex" class="my-text"></span></td>
				</tr>
				<tr>
					<td><span>邮箱：</span><span id="form_email" class="my-text"></span></td>
					<td><span>电话：</span><span id="form_phone" class="my-text"></span></td>
				</tr>
				<tr>
					<td><span>职务：</span><span id="form_job" class="my-text"></span></td>
					<td>
						<!-- <span>角色：</span>
						<select id="form_role" name="form_role">
						</select> -->
						<span id="role">角色：</span><span id="form_role" class="my-text"></span>
					</td>
				</tr>
				<tr>
					<td><span><i class="c-red">*&nbsp;</i>用户账号：</span><input id="form_user_loginName" type="text" name="user_loginName" maxlength="16"/></td>
					<td><span><i class="c-red">*&nbsp;</i>密码：</span><input id="form_pass" type="password" name="pass"/></td>
				</tr>
				<tr>
					<td><label class="my-label_checkbox"><i class="c-red">*&nbsp;</i>锁定账户：<input id="form_isLock" type="checkbox" name="isLock"/></label></td>
					<td style="display: none;"><label class="my-label_checkbox"><i class="c-red">*&nbsp;</i>不显示通知：<input id="form_isShowMessage" type="checkbox" name="isShowMessage"/></label></td>
				</tr>
			</table>
		</form>
	</div>
	<div class="modal-footer al-center bg-fff">
		<button type="button" class="btn green"
			style="margin-right: 25px;" id="form_user_save">保存</button>
		<button type="button" data-dismiss="modal" class="btn red"
			id="form_btn_close">取消</button>
	</div>
</div>

<div id="tip" class="modal hide fade" tabindex="-1" data-focus-on="input:first" style="width:400px;margin-left: -200px;">
	<div class="modal-header bg-green c-bold c-fff" >
		绑定成功
	</div>
	<div class="modal-body" style="max-height: 100px">
		<div style="margin-top: 40px;"><p style="display: flex; justify-content: center;">恭喜你，您已经成功绑定账户，请进行消息接收管理</p></div>
		<div style="display: flex; justify-content: space-around; padding-top: 30px;">
			<button type="button"  class="btn" data-dismiss="modal">稍后进行</button>
			<button type="button"  class="btn" data-dismiss="modal" onclick='util.showContent("pages/message/msgNoticeConfig.jsp")'>立即前往</button>
		</div>
	</div>
	<div class="modal-footer al-center bg-fff">
	</div>
</div>

<!--账户期限设置-->
<div id="account_validity" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
	<div class="modal-header add-customer-header bg-green c-bold c-fff" >
		账户期限设置
	</div>
	<div class="modal-body add-customer-body">
		<form id="account_validity_form">
			<input type="hidden" id="account_validity_pkId"/>
			<input type="hidden" id="account_validity_eId"/>
			<table class="table" id="account_validity_table">
				<tr>
					<td><span><i class="c-red">*&nbsp;</i>用户登录账户：</span><span id="account_login_name" class="my-text" name="account_login_name"></span></td>
				</tr>
				<tr>
					<td><span><i class="c-red">*&nbsp;</i>账户开通时间：</span><span id="account_start_date" class="my-text" name="account_start_date"></span></td>
				</tr>
				<tr>
					<td>
						<span>账户有效期限：</span>
						<select id="account_validity_type" tabindex="1" class="my-select">
						    <option value="0" selected="selected">永久</option>
						    <option value="1">半年</option>  
						    <option value="2">一年</option>  
						    <option value="3">两年</option>  
						    <option value="4">五年</option>  
						    <option value="5">十年</option>
						    <option value="6">自定义</option>    
						</select>
					</td>
				</tr>
				<tr>
					<td><span>账户截止时间：</span><input id="account_end_date" class="data-picker Wdate enterSearch" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></td>
				</tr>
				
			</table>
		</form>
	</div>
	<div class="modal-footer al-center bg-fff">
		<button type="button" class="btn green"
			style="margin-right: 25px;" id="account_validity_save">保存</button>
		<button type="button" data-dismiss="modal" class="btn red"
			id="account_validity_close">取消</button>
	</div>
</div>

<script type="text/javascript" src="pages/system/js/usermng.js"></script>
<script type="text/javascript" src="pages/system/js/DateUtil.js"></script>
<!-- <script type="text/javascript" src="pages/system/js/xdate.js"></script> -->
<script src="media/js/ui-modals.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		UserGridPanel.init();
	});
</script>